%A*____________________________________________
eval_paths_astern([]).

eval_paths_astern([FirstPath|RestPaths]):-
	length(FirstPath,Resultat),
	eval_path_astern(FirstPath,Resultat),
	eval_paths_astern(RestPaths). 
%A*____________________________________________
%A*
insert_new_paths(astern,NewPaths,OldPaths,AllPaths):-
	eval_paths_astern(NewPaths),
	insert_new_paths_informed(NewPaths,OldPaths,AllPaths),!,
	write_action(AllPaths),
	write_state(AllPaths).
%A*____________________________________

eval_path_astern([(_,State,Value)|_],Resultat):-
	eval_state_astern(State,Value,Resultat).
	
eval_state_astern(State,Value,Resultat):-
	goal_description(Solution),
	subtract(Solution,State,Rest),
	length(Rest, RestLength),
	%intersection(Solution, State, Bisher),%berechnung evtl nicht genau genug
	plus(RestLength,Resultat,Value).
	
%A*____________________________________